﻿using ConfExpert.Forms.Base;
using Extensions;
using System;

namespace ConfExpert.Utility
{
    public partial class ExcelView : XForm
    {
        public ExcelView()
        {
            InitializeComponent();
        }

        private void ExcelView_Load(object sender, EventArgs e)
        {
            
            btnRun.ItemClick += btnRun_ItemClick;
        }

        void btnRun_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            gridView1.EndEdit();
            gridView1.InitByQuery(txtQuery.EditValue.ToStr());
            gridView1.MakeReadOnly();
            gridView1.AddSummary();
            gridView1.BestFitColumns();
            
        }
    }
}
